fix(web): remember panel width for each thread - #11310
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small, localized web fix that scopes existing preview-panel width persistence by thread and adds focused coverage for switching and interrupted drags. It leaves defaults and unrelated runtime paths unchanged, with no schema, infrastructure, security, or diagnostic-configuration impact. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
Resizing the right panel in thread B overwrote thread A's width. Each thread now remembers its own width, scoped to its environment, and switching threads reloads that width without remounting the panel. An unfinished drag is cancelled when the thread changes.
Fixes #5548. Stacked on #11298 for the device-ticket routing correction already required by this checkout. The three-file diff contains only panel-width behavior and its tests. Threads without a saved width start at the existing default; the previous shared chat width is not migrated. The pull-request page keeps its separate width key.
Fifteen focused tests and the web typecheck pass. Both new switching tests fail on the original hook, and the 17 scoped lint warnings match baseline. In the actual Linux Chromium client, A was resized to 380 px and B to 540 px: returning to A showed 540 px before and 380 px after. Reload retained 380 px. Native macOS/Windows desktop, mobile and remote/relay integration were not exercised.
Before, returning to A uses B's width:
After, A restores its 380 px width:
5548-switch.mp4
Default-behavior refinement remains pending after the authorized Fable retry failed. No merge requested.
Implemented and tested with GPT-6 through Codex in T3 Code.